

Namespace Aricie.DNN.Services.Url.FriendlyUrl
    Public Class RewriteLookupMatch
        Private _PatternMatch As String = ""
        Private _ParamCollection As New NameValueCollection


        Public Property PatternMatch() As String
            Get
                Return _PatternMatch
            End Get
            Set(ByVal value As String)
                _PatternMatch = value
            End Set
        End Property


        Public Property ParamCollection() As NameValueCollection
            Get
                Return _ParamCollection
            End Get
            Set(ByVal value As NameValueCollection)
                _ParamCollection = value
            End Set
        End Property


        Public Sub New()

        End Sub

        Public Sub New(ByVal patternMatch As String)
            Me._PatternMatch = patternMatch
        End Sub

        Public Sub New(ByVal patternMatch As String, ByVal paramCollection As NameValueCollection)
            Me.New(patternMatch)
            Me._ParamCollection = paramCollection

        End Sub

        Public Shared EmptyMatch As RewriteLookupMatch = New RewriteLookupMatch()


        Public Sub AddParameter(ByVal name As String, ByVal value As String)
            Me._ParamCollection.Add(name, value)
        End Sub

        Public Function IsEmpty() As Boolean
            Return Me.Equals(EmptyMatch) OrElse Me._PatternMatch = ""
        End Function
    End Class
End Namespace
